﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StuertzDatenbank;

namespace StuertzDatenbank
{
    public class Hersteller
    {
        private int Herstellernummer;
        private string Name;
        private string Adressline1;
        private Country Country;
        private string AdressLine2;
        private string City;
        private string State;
        private string Postcode;
        private List<Ansprechpartner> Ansprechpartner;
        private List<Profil> Profile;


        public Hersteller(int i)
        {
            this.Herstellernummer = i;
             Name= "";
            Adressline1 = "";
            Country = new Country();
            AdressLine2= "";
            City= "";
            State= "";
            Postcode= "";
            Ansprechpartner= new List<Ansprechpartner>();
            Profile= new List<Profil>();
        }

        /// <summary>
        /// selbst die Hersteller ID
        /// </summary>
        /// <param name="i"></param>
        public void setID(int i)
        {
            if (i == -1)
            {
                Console.WriteLine("Error: ID muss noch festgelegt werden");
            }
            else
            {
                this.Herstellernummer = i;
            }

        }
     
        /// <summary>
        /// gibt die Hersteller ID wieder
        /// </summary>
        /// <returns></returns>
        public int getID()
        {
            return this.Herstellernummer;
        }


        /// <summary>
        /// setzt den Namen
        /// </summary>
        /// <param name="input"></param>
        public void setName(string input)
        {
            this.Name = input;
        }

        /// <summary>
        /// gibt den Namen wieder
        /// </summary>
        /// <returns></returns>
        public string getName()
        {
            return this.Name;
        }

        /// <summary>
        /// setzt die erste Adressenlinie
        /// </summary>
        /// <param name="input"></param>
        public void setAdressline1(string input)
        {
            this.Adressline1 = input;
        }

        /// <summary>
        /// gibt die erste Adressenlinie wieder
        /// </summary>
        /// <returns></returns>
        public string getAdressline1()
        {
            return this.Adressline1;
        }

        /// <summary>
        /// setzt das Land
        /// </summary>
        /// <param name="input"></param>
        public void setCountry(Country  input)
        {
            this.Country = input;
        }

        /// <summary>
        /// gibt das Land wieder
        /// </summary>
        /// <returns></returns>
        public Country  getCountry()
        {
            return this.Country;
        }

        /// <summary>
        /// setzt die zweite Adressenlinie
        /// </summary>
        /// <param name="input"></param>
        public void setAdressline2(string  input)
        {
            this.AdressLine2 = input;
        }

        /// <summary>
        /// gibt die zweite Adressenlinie wieder
        /// </summary>
        /// <returns></returns>
        public string  getAdressline2()
        {
            return this.AdressLine2;
        }

        /// <summary>
        /// setzt die Stadt
        /// </summary>
        /// <param name="input"></param>
        public void setCity(string  input)
        {
            this.City = input;
        }

        /// <summary>
        /// gibt die Stadt wieder
        /// </summary>
        /// <returns></returns>
        public string  getCity()
        {
            return this.City;
        }

        /// <summary>
        /// setzt das Land
        /// </summary>
        /// <param name="input"></param>
        public void setState(string  input)
        {
            this.State = input;
        }

        /// <summary>
        /// gibt das Land wieder
        /// </summary>
        /// <returns></returns>
        public string  getState()
        {
            return this.State;
        }

        /// <summary>
        /// setzt die Postleitzahl
        /// </summary>
        /// <param name="input"></param>
        public void setPostcode(String input)
        {
            this.Postcode = input;
        }

        /// <summary>
        /// die Postleitzahl wieder
        /// </summary>
        /// <returns></returns>
        public String getPostcode()
        {
            return this.Postcode;
        }

        /// <summary>
        /// setzt die Ansprechpartnerliste
        /// </summary>
        /// <param name="input"></param>
        public void setAnsprechpartner(List<Ansprechpartner>  input)
        {
            this.Ansprechpartner = input;
        }

        /// <summary>
        /// der Ansprechpartnerliste einen Ansprechpartner hinzu
        /// </summary>
        /// <param name="input"></param>
        public void addAnsprechpartner(Ansprechpartner input)
        {
            this.Ansprechpartner.Add(input);
        }

        /// <summary>
        /// entfernt einen Ansprechpartner aus der Ansprechpartnerliste
        /// </summary>
        /// <param name="input"></param>
        public void deleteAnsprechpartner(Ansprechpartner input)
        {
            this.Ansprechpartner.Remove(input);
        }
        
        /// <summary>
        /// gibt die Ansprechpartnerliste aus
        /// </summary>
        /// <returns></returns>
        public List<Ansprechpartner>  getAnsprechpartner()
        {
            return this.Ansprechpartner;
        }
        
        /// <summary>
        /// setzt die Profilliste
        /// </summary>
        /// <param name="input"></param>
        public void setProfile(List<Profil>  input)
        {
            this.Profile = input;
        }

        /// <summary>
        /// fügt der Profilliste ein Profil hinzu
        /// </summary>
        /// <param name="input"></param>
        public void addProfil(Profil input)
        {
            this.Profile.Add(input);
        }

        /// <summary>
        /// löscht ein Profil aus der Profilliste
        /// </summary>
        /// <param name="input"></param>
        public void deleteProfil(Profil input)
        {
            this.Profile.Remove(input);
        }

        /// <summary>
        /// gibt die Profilliste aus
        /// </summary>
        /// <returns></returns>
        public List<Profil>  getProfile()
        {
            return this.Profile;
        }
    }
}
